x86/domctl: fix getpageframeinfo* handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 20 May 2015 11:31:50 +0000 (13:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 20 May 2015 11:31:50 +0000 (13:31 +0200)
commitea329b0dccbd66133b136971a78ea88baaeca817
treebf17bcc8ac7f11dd7b3003c4e7e1df80f2c4b6dd
parent119ce8154c32202fe30c4474819e64605333f297
x86/domctl: fix getpageframeinfo* handling

In tree, there is one single caller of XEN_DOMCTL_getpageframeinfo3
(xc_get_pfn_type_batch()), and no callers of the older variants.

getpageframeinfo3 and getpageframeinfo2 are compatible if the parameter
contents are considered to be unsigned long, and indeed, a compat guest
calling getpageframeinfo3 falls through into the getpageframeinfo2 handler.

However, getpageframeinfo3 and getpageframeinfo2 have different algorithms for
calculating the eventual frame type, which means that a toolstack will get
different answers depending on whether it is compat or not.

Rewrite getpageframeinfo3 such that the code block can handle both regular and
compat guests, and use the original getpageframeinfo3 algorithm for frame
time, which is more complete.

Remove getpageframeinfo2 and getpageframeinfo1, as they are unused and
obsolete.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domctl.c
xen/include/public/domctl.h
xen/xsm/flask/hooks.c
xen/xsm/flask/policy/access_vectors